package com.goods.controller.business;

import com.goods.business.service.InStockService;
import com.goods.common.response.ResponseBean;
import com.goods.common.vo.business.InStockVO;
import com.goods.common.vo.system.PageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/business/inStock")
public class InStockController {

    @Autowired
    private InStockService inStockService;

    @GetMapping("/findInStockList")
    public ResponseBean findInStockList(@RequestParam(value = "pageNum" ,defaultValue = "1") Integer pageNum,
                                        @RequestParam(value = "pageSize")  Integer pageSize,
                                        InStockVO inStockVO){
        PageVO pageVO =
                inStockService.findInStockList(pageNum, pageSize,inStockVO);
    return ResponseBean.success(pageVO);

    }
}
